<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("basePath", basePath);
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>导航管理</title>
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet"
	href="${basePath }/admin/bower_components/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
	<table class="table table-hover">
	<thead>
			<tr>
				<td colspan="7">
					<a class="btn btn-primary btn-lg active" href="${basePath }admin/toEditNav.action">添加数据</a>
				</td>
			</tr>
		
			<tr>
				<th>编号</th>
				<th>名称</th>
				<th>英文名称</th>
				<th>链接</th>
				<th>target</th>
				<th>状态</th>
				<th>&nbsp;&nbsp;操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${navList }" var="nav">
				<tr>
					<th scope="row">${nav.id }</th>
					<td>${nav.name }</td>
					<td>${nav.english_name }</td>
					<td>${nav.url }</td>
					<td>${nav.target }</td>
					<td>${nav.status }</td>
					<td><a href="${basePath }admin/toEditNav.action?id=${nav.id}"><span class="glyphicon glyphicon-pencil"></span></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="${basePath }admin/deleteNav.action?id=${nav.id}" onclick="return confirm('是否确认删除数据？')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

</body>
</html>